package com.john.design.七大原则.依赖倒置原则;

/**
 * @Author: JohnCoding
 * @Description:
 * @date: 2020/8/9 16:01
 */
public class Test {

    //v1
    //    public static void main(String[] args) {
//        John john = new John();
//        john.studyJavaCode();
//        john.studyFECourse();
//
//    }


//v2
//    public static void main(String[] args) {
//        John john = new John();
//        john.studyImoocCourse(new JavaCoure());
//        john.studyImoocCourse(new FECourse());
//        john.studyImoocCourse(new PythodCourse());
//    }

//v3
//    public static void main(String[] args) {
//        John john = new John(new JavaCoure());
//        john.studyImoocCourse();
//        John john1 = new John(new FECourse());
//        john1.studyImoocCourse();
//        John john2 = new John(new PythodCourse());
//        john2.studyImoocCourse();
//    }


    public static void main(String[] args) {
        John john = new John();
        john.setiCourse(new JavaCoure());
        john.studyImoocCourse();
        john.setiCourse(new FECourse());
        john.studyImoocCourse();
    }
}
